import java.lang.*;
import java.lang.reflect.Method;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.regex.Pattern;
import java.io.*;
class cecjsimul {
public static void main (String args[])
{

try {
   Class[] param=null;
   Class type = ClassLoader.getSystemClassLoader().loadClass(args[0]);
   Object obj = type.newInstance();
   	Object[] voidargs=null;
   String toto=args[0]+"_tick";
   Method listmeth[]=obj.getClass().getMethods();
   Method m = obj.getClass().getMethod(toto,param);
   BufferedReader clavier = new BufferedReader(
				new InputStreamReader(System.in));
   String buffer="";
   String ticks[]={};
   Pattern p1=Pattern.compile(";$?");
   Pattern p2=Pattern.compile(",");
  do  
    {
	if (ticks.length==0)
	   {
		buffer=clavier.readLine();
	   	ticks=p1.split(buffer,-1);
	   }
	//Trairement des signaux;
	String tab_sig[]=p2.split(ticks[0]); 
	String tmp[]=new String[ticks.length-1];
	System.arraycopy(ticks,1,tmp,0,ticks.length-1);
	ticks=tmp;
	for(int i=0;i<tab_sig.length;i++)
	    {
		try {
		    obj.getClass().getMethod("input"+tab_sig[i],param)
			.invoke(obj,voidargs);
		}
		catch( Exception e) 
		    { 
			//	e.printStackTrace();
		    }
	    }
    }
  while(((Integer)m.invoke(obj,voidargs))!=0);
  }
catch(Exception e) {e.printStackTrace();}
}
}
